package com.nxn.core.service.impl;

import java.io.Serializable;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.nxn.core.dao.CRUDDao;
import com.nxn.core.service.CRUDService;

/**
 * Implement Services needed 
 * CRUD service
 * @author Michael
 *
 */

@Service
public class CRUDServiceImpl<T, PK extends Serializable> 
	extends GenericManagerImpl<T, PK> implements CRUDService<T, PK> {
	
    @Autowired(required=true)
	private CRUDDao<T, PK> crudDao;
	
	public CRUDDao<T, PK> getSearchImpl() {
		return crudDao;
	}

	@PostConstruct
	public void init() {
		System.out.println("CRUDServiceImpl initialized...");
	}

	@PreDestroy
	public void destroy() {

	}

}
